﻿using com.fukefu.sql;
using com.fukefu.update.instantiated.MarketShare;

namespace com.fukefu.update.instantiated
{
    public class Market : UpdateData
    {
        public override void Start()
        {
            Display("-正在初始化...");
            B(new PM_Keyword());
            B(new PM_URL());
            B(new PM_MyMarketShare());
            Display("---------------------------");
            Display("-正在更新数据库...");
            SqlServerOperate sql = new SqlServerOperate();
            sql.Update("exec update_database");
            sql.Close();
            Display("-全部更新结束。");
            SetButton(true);
        }
        private void B(PM p)
        {
            p._Display += Display;
            p._SetMaxNum += SetMaxNum;
            p._SetNumAdd += SetNumAdd;
            p.Init();
        }
        //获取配置文字
        public override string GetTitle()
        {
            return "更新关键字排名";
        }
    }
}
